PATH = %PATH%;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
SET SPDIR=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12
SET FILENAME=SPChainGang.wsp
SET URL=http://localhost/reorg/portal

"%SPDIR%\bin\stsadm.exe" -o deactivatefeature -filename SPChainGangApplicationPages\Feature.xml -force -url %URL%
"%SPDIR%\bin\stsadm.exe" -o deactivatefeature -filename SPChainGangListTemplates\Feature.xml -force -url %URL%

"%SPDIR%\bin\stsadm.exe" -o retractsolution -name %FILENAME% -immediate 
REM -url %URL%
"%SPDIR%\bin\stsadm.exe" -o execadmsvcjobs
"%SPDIR%\bin\stsadm.exe" -o deletesolution -override -name %FILENAME%

pause
cls

"%SPDIR%\bin\stsadm.exe" -o addsolution -filename %FILENAME%
"%SPDIR%\bin\stsadm.exe" -o deploysolution -name %FILENAME% -force -allowgacdeployment -allowCasPolicies -immediate 
REM -url %URL%
"%SPDIR%\bin\stsadm.exe" -o execadmsvcjobs

"%SPDIR%\bin\stsadm.exe" -o activatefeature -filename SPChainGangListTemplates\Feature.xml -force -url %URL%
"%SPDIR%\bin\stsadm.exe" -o activatefeature -filename SPChainGangApplicationPages\Feature.xml -force -url %URL%

SET URL=
pause